const person = {
    name: "tom",
    sayHi: function () {
        console.log(this.name);
    },
    nestedfun: function () {
        setTimeout (function(){
            console.log(this.name);
        },100);
    },
    nestedfunwitharrow: function () {
        setTimeout (() => {
            console.log(this.name);
        },100);
    }
}

person.sayHi();
//const p = new person();
//p.sayHi();
person.nestedfun();
person.nestedfunwitharrow();

console.log(typeof(person))
